home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
01
/
6
/
DISK0162.ZIP
/
SCREEN.INC
< prev
next >
Wrap
Text File
|
1984-06-25
|
2KB
|
89 lines
' SCREEN.INC: a set of sample screen formatting routines.
'
' version: 6-25-84
' compiler: Structured BASIC v1.12
' uses: CLS.INC
' module type: include
'
' To use this package, put the statement
'
' include SCREEN.INC
'
' in your program. Before you can use the procedures here, you must
' have the statement
'
' do INITIALIZE.SCREEN
'
' somewhere. The variables you can then reset yourself are:
'
' SCREEN.WIDTH The width of the screen in characters (40/80)
' BORDER$ The character you want displayed in borders
procedure INITIALIZE.SCREEN 'Initialize all the screen variables
SCREEN.WIDTH = 80
BORDER$ = string$(SCREEN.WIDTH,&HC4)
MSG.MASK$ = space$(20)
do SETUP.CLS
endproc
procedure CLEAR.SCREEN 'Clear the screen, set keys off
key off : width SCREEN.WIDTH : cls
endproc
procedure SET.TITLES 'Redisplay all the titles
do CLEAR.SCREEN
locate 1,1 : print L.TITLE$;
locate 1,SCREEN.WIDTH-len(R.TITLE$)+1 : print R.TITLE$;
locate 3,1 : print BORDER$
endproc
procedure SET.FUNCTION.MSG 'Update the function message
locate 2,1
print left$(FUNC.MSG$+MSG.MASK$,20);
endproc
procedure SET.ACTION.MSG 'Update the action message
locate 2,61
print right$(MSG.MASK$+ACT.MSG$,20);
endproc
procedure CLEAR.AREA 'Clear lines 4 thru end of screen
locate 4,1
do CLEOS
endproc
procedure SET.LINE.24 'Put a message on line 24
locate 24,1
print LINE.24.MSG$;
endproc
procedure CLEAR.LINE.24 'Clear the 24th line of the screen
locate 24,1
do CLEOL
endproc
procedure DRAW.BOX 'Draw a box
locate BOX.ROW,BOX.COL
print chr$(&HDA);string$(BOX.LEN-2,&HC4);chr$(&HBF)
locate ,BOX.COL
for BOX.I=1 to BOX.HT-2
print chr$(&HB3);space$(BOX.LEN-2);chr$(&HB3)
locate ,BOX.COL
next BOX.I
print chr$(&HC0);string$(BOX.LEN-2,&HC4);chr$(&HD9)
endproc
procedure DRAW.FRAME 'Draw a frame (double lines)
locate FRAME.ROW,FRAME.COL
print chr$(&HC9);string$(FRAME.LEN-2,&HCD);chr$(&HBB)
locate ,FRAME.COL
for FRAME.I = 1 to FRAME.HT-2
print chr$(&HBA);space$(FRAME.LEN-2);chr$(&HBA)
locate ,FRAME.COL
next FRAME.I
print chr$(&HC8);string$(FRAME.LEN-2,&HCD);chr$(&HBC)
endproc
include CLS.INC